<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th class="text-center"><div class="table-first-id">ID</div></th>
            <th class="text-center" width="25%">活动名称</th>
            <th class="text-center" width="10%">类型</th>
            <th class="text-center" width="25%">有效时间</th>
            <th class="text-center" width="10%">创建时间</th>
            <th class="text-center" width="10%">状态</th>
            <th class="text-center" width="15%">操作</th>
        </tr>
        </thead>
    </table>
    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover table-xs-content">
            <tbody id="tbodyActivity">
            <tr class="jqgfirstrow" role="row">
                <th class="text-center"><div class="table-first-id">&nbsp;</div></th>
                <th class="text-center" width="25%">&nbsp;</th>
                <th class="text-center" width="10%">&nbsp;</th>
                <th class="text-center" width="25%">&nbsp;</th>
                <th class="text-center" width="10%">&nbsp;</th>
                <th class="text-center" width="10%">&nbsp;</th>
                <th class="text-center" width="15%">&nbsp;</th>
            </tr>
            <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                <td colspan="7" class="text-center">
                    <div class="noDataTipsBox">
                        <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                    </div>
                </td>
            </tr>

            <tr th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="activity : ${dataMap['list']}">
                    <td class="text-center">
                        <div class="table-first-id">
                            <input type="checkbox" class="i-checks" name="activityid" th:value="${activity['id']}"/>
                        </div>
                    </td>
                    <td class="text-center" th:attr="id='activity-name-'+${activity['id']}" th:text="${activity['activityName']}"></td>
                    <td class="text-center" th:attr="id='activity-type-'+${activity['id']}" >
                        <span th:if="${#strings.contains(activity['activityType'],'1')}">满减&nbsp;</span>
                        <span th:if="${#strings.contains(activity['activityType'],'2')}">&nbsp;满赠</span>
                    </td>
                    <td class="text-center">
                        <span th:text="${#strings.substring(activity['beginTime'],0,16)}+'—'+${#strings.substring(activity['endTime'],0,16)}"></span>
                    </td>
                    <td class="text-center">
                        <span th:text="${#strings.substring(activity['createTime'],0,16)}"></span>
                    </td>
                    <td class="text-center status">
                        <span th:if="${activity['status']} == 1 " class="label label-info">正常</span>
                        <span th:if="${activity['status']} == 2" class="label label-danger">冻结</span>
                    </td>
                    <td class="text-center">
                        <a href="javascript:void(0);" class="c-master fs14 ml5 activityLookInfo" th:attr="data-id=${activity['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="查看"><i class="fa fa-eye"></i>
                        </a>
                        <!--<a th:href="@{/admin/op/activity/toSaveUpdateOpActivityPage?id={activityId}(activityId=${activity['id']})}" class="c-master fs14 ml5  updateStatus" data-toggle="tooltip" data-placement="bottom" data-original-title="编辑"><i class="fa fa-edit"></i>
                        </a>-->
                        <a th:if="${activity['status']} == 1" href="javascript:void(0);" class="c-master fs14 ml5 unlockBatch"   th:attr="data-id=${activity['id']},data-status=${activity['status']}"   data-toggle="tooltip" data-placement="bottom" data-original-title="冻结"><i class="fa fa-unlock-alt"></i></a>
                        <a th:if="${activity['status']} == 2" href="javascript:void(0);" class="c-master fs14 ml5 unlockBatch"  th:attr="data-id=${activity['id']},data-status=${activity['status']}"  data-toggle="tooltip" data-placement="bottom" data-original-title="恢复"><i class="fa fa-history"></i></a>
                        <a th:if="${activity['releaseStatus']} == 2" href="javascript:void(0);" class="c-master fs14 ml5 releaseAndUnRelease"  th:attr="data-id=${activity['id']},data-status=${activity['releaseStatus']}"   data-toggle="tooltip" data-placement="bottom" data-original-title="待发布"><i class="fa fa-arrow-up"></i></a>
                        <a th:if="${activity['releaseStatus']} == 2" href="javascript:void(0);" class="c-master fs14 ml5 releaseAndUnRelease"  th:attr="data-id=${activity['id']},data-status=${activity['releaseStatus']}"  data-toggle="tooltip" data-placement="bottom" data-original-title="发布"><i class="fa fa-arrow-down"></i></a>
                        <a href="javascript:void(0);" class="c-master fs14 ml5 deleteActivity" th:attr="data-id=${activity['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="删除">
                            <i class="fa fa-trash-o"></i>
                        </a>
                    </td>
                </tr>

            </tbody>
        </table>
    </div>
    <!-- 分页，开始 -->
    <div data-th-replace="layout/adminPage"></div>
    <!-- 分页，结束 -->
</div>

